home *** CD-ROM | disk | FTP | other *** search
Wrap
<HTML> <HEAD> <SCRIPT LANGUAGE="JavaScript"> <!-- Begin // Put all strings here for easier translation to other languages var title = "Flare SWFlet : Slide In Text"; var swf_file = "Slide In Text1.swf"; var swf_file1 = "Slide In Text1.swf"; var swf_file2 = "Slide In Text2.swf"; var swf_file3 = "Slide In Text3.swf"; var logo_file = "Flare SWFlet Logo.gif" var requires_cp = "The file requires Cool Page to be viewed"; var requires_cp_update = "To edit this object, please upgrade your copy of Cool Page to the latest version"; var unexpected_error = "An unexpected error occurred. Please notify http://www.imediabuilders.com"; var swfwidth=468; var swfheight=60; var swfcolor="1"; var editor=window.external.GetObjectEditor("-1"); var objects_folder=editor.substring(0,editor.lastIndexOf("\\Flash")+1); document.write( "<TITLE>" + title + "</TITLE>" ); // Not running inside Cool Page? if( !window.external || !window.external.Undefined || !window.external.Defined || (undefined = window.external.Undefined()) == (defined = window.external.Defined() )) { AlertClose( requires_cp ); } // Initialize HTML for the first time if(window.external.GetObjectHTML("-1") == defined) window.external.SetObjectSize("-1","1","1"); // Not running a version of Cool Page which supports all the APIs we use? // (note: add to this test any Cool Page APIs you call in this file) var w, h; if( defined == undefined || !window.external.GetSelectedObject || window.external.GetSelectedObject( "-1" ) == undefined || !window.external.GetObjectClass || window.external.GetObjectClass( "-1" ) != "PageHTML" || !window.external.SetObjectEditorName || window.external.SetObjectEditorName( "-1", title ) == undefined || !window.external.GetObjectWidth || (w = window.external.GetObjectWidth( "-1" )) == undefined || !window.external.GetObjectHeight || (h = window.external.GetObjectHeight( "-1" )) == undefined || !window.external.SetObjectSize || window.external.SetObjectSize( "-1", w, h ) == undefined || !window.external.GetObjectHTML || (h = window.external.GetObjectHTML( "-1" )) == undefined || !window.external.SetObjectHTML || window.external.SetObjectHTML( "-1", (h == defined ? "" : h) ) == undefined || !window.external.GetObjectFiles || window.external.GetObjectFiles( "-1", ";" ) == undefined || !window.external.SetObjectFiles // unrealistic to check all argument variants here just assume they are supported || window.external.SetObjectFiles( "-1", file0, file1, ... fileN ) == undefined || !window.external.CopyFile || window.external.CopyFile("","") == undefined ) { AlertClose( requires_cp_update ); } function AlertClose(msg) { alert(msg); document.write("<HEAD><BODY></BODY></HEAD></HTML>"); document.close(); } function ChkErr( return_value ) { if( return_value == "" || return_value == undefined ) { AlertClose( unexpected_error ); return undefined; } return return_value; } var prefix = "file:///"; var url = window.location.href; if(url.indexOf(prefix) != 0) { alert(unexpected_error); } var temp_folder=url.substring(prefix.length, url.lastIndexOf("/")).replace( /%20/g, " ").replace( /\//g, "\\"); // Return current values of HTML object function ParseHTML() { var current = new Array("swfwidth","swfheight","swfbgcolor","swfurl","swftype","swftarget","swfsize", "swftext"); current["swfwidth"] = 468; current["swfheight"] = 60; current["swfbgcolor"] = "1"; current["swfurl"] = "http://www.flareworks.com"; current["swftype"] = "0"; current["swftarget"] = "_blank"; current["swfsize"] = "0"; current["swftext"] = "Flying Message"; var html = ChkErr(window.external.GetObjectHTML("-1")); if(html==defined) return current; current["swfwidth"] = ChkErr(window.external.GetObjectWidth("-1")); current["swfheight"] = ChkErr(window.external.GetObjectHeight("-1")); var s = 'current["swftext"] = '; var i = html.indexOf(s); if(i<0) alert(unexpected_error); else { s = html.substring(i+s.length); i = s.indexOf(';'); if(i<0)alert(unexpected_error); else current["swftext"] = s.substring(1,i-1); } s = 'current["swfbgcolor"] = '; i = html.indexOf(s); if(i<0) alert(unexpected_error); else { s = html.substring(i+s.length); i = s.indexOf(';'); if(i<0)alert(unexpected_error); else current["swfbgcolor"] = s.substring(1,i-1); } s = 'current["swftype"] = '; i = html.indexOf(s); if(i<0) alert(unexpected_error); else { s = html.substring(i+s.length); i = s.indexOf(';'); if(i<0)alert(unexpected_error); else current["swftype"] = s.substring(1,i-1); } s = 'current["swftarget"] = '; i = html.indexOf(s); if(i<0) alert(unexpected_error); else { s = html.substring(i+s.length); i = s.indexOf(';'); if(i<0)alert(unexpected_error); else current["swftarget"] = s.substring(1,i-1); } s = 'current["swfsize"] = '; i = html.indexOf(s); if(i<0) alert(unexpected_error); else { s = html.substring(i+s.length); i = s.indexOf(';'); if(i<0)alert(unexpected_error); else current["swfsize"] = s.substring(1,i-1); } s = 'current["swfurl"] = '; i = html.indexOf(s); if(i<0)alert(unexpected_error); else { s = html.substring(i+s.length); i = s.indexOf(';'); if(i<0)alert(unexpected_error); else current["swfurl"] = s.substring(1,i-1); } return current; } // Assign current values to GUI form function ReadSelectedObject( form ) { var current = ParseHTML(); form.width.value=current["swfwidth"]; form.height.value=current["swfheight"]; form.text.value=current["swftext"]; form.target.value=current["swftarget"]; form.url.value=current["swfurl"]; form.size.selectedIndex=current["swfsize"]; form.type.selectedIndex=current["swftype"]; if(current["swfbgcolor"]==1) form.bgcolor[0].checked = true; if(current["swfbgcolor"]==2) form.bgcolor[1].checked = true; if(current["swfbgcolor"]==3) form.bgcolor[2].checked = true; // Copy files to TEMP folder ChkErr( window.external.CopyFile( objects_folder + "Flash\\Flare\\" + swf_file1,temp_folder ) ); ChkErr( window.external.CopyFile( objects_folder + "Flash\\Flare\\" + swf_file2,temp_folder ) ); ChkErr( window.external.CopyFile( objects_folder + "Flash\\Flare\\" + swf_file3,temp_folder ) ); return current; } // The HTML written to file function SWF_HTML( which ) { var w; var h; var number; number=Math.round(100000*Math.random()); if (which==0) { w=420; h=54; num=""; } else { w=ChkErr(window.external.GetObjectWidth("-1")); h=ChkErr(window.external.GetObjectHeight("-1")); num=number; } var t="<OBJECT classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"\r\n"; t+=" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,0,0\"\r\n"; t+=" id=swfmovie"+num+" width="+w+" height="+h+">\r\n"; t+="<PARAM NAME=movie VALUE=\"" + swf_file + "\" ><PARAM NAME=quality VALUE=high><PARAM NAME=scale VALUE=exactfit>\r\n"; t+="<EMBED src=\"" + swf_file + "\" name=swfmovie"+num; t+=" pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\"\r\n"; t+=" type=\"application/x-shockwave-flash\""; t+=" swLiveConnect=true scale=exactfit width="+w+" height="+h+" quality=high></EMBED>\r\n"; t+="</OBJECT>\r\n"; t+="\r\n<SCRIPT LANGUAGE=\"JavaScript\">\r\n"; t+="<!"; t+="-"; t+="-"; t+="\r\nfunction setparam"+num+"()\r\n{\r\n"; t+="var current = new Array(\"swfbgcolor\",\"swfurl\",\"swftype\",\"swftarget\",\"swfsize\",\"swftext\",\"swffile\");"; t+="\r\ncurrent[\"swfbgcolor\"] = \"" + swfcolor + "\";"; t+="\r\ncurrent[\"swfurl\"] = \"" + window.document.editor.url.value + "\";"; t+="\r\ncurrent[\"swftype\"] = \"" + window.document.editor.type.selectedIndex + "\";"; t+="\r\ncurrent[\"swftarget\"] = \"" + window.document.editor.target.value + "\";"; t+="\r\ncurrent[\"swfsize\"] = \"" + window.document.editor.size.selectedIndex + "\";"; t+="\r\ncurrent[\"swftext\"] = \"" + window.document.editor.text.value + "\";"; t+="\r\ncurrent[\"swffile\"] = \"" + logo_file + "\";"; t+="\r\nwindow.document.swfmovie"+num+".SetVariable(\"textfx\",current[\"swftext\"]);\r\n"; t+="window.document.swfmovie"+num+".SetVariable(\"mywebsite\",current[\"swfurl\"]);\r\n"; t+="window.document.swfmovie"+num+".SetVariable(\"tarvar\",current[\"swftarget\"]);\r\n}\r\n"; t+="/"; t+="/"; t+="-"; t+="-"; t+=">"; t+="\r\n</SCRIPT>"; t+="\r\n<IMG SRC=\"t.gif\" ALT=\"\" WIDTH=1 HEIGHT=1 BORDER=0 VSPACE=0 HSPACE=0 onLoad=\"javascript:setparam"+num+"()\">"; return t; } function WriteSelectedObject( form ) { // Unable to resize object in Cool Page (and Cool Page already displayed error to user)? if( !window.external.SetObjectSize( "-1", form.width.value, form.height.value) ) return; var html=SWF_HTML(1); var current = ParseHTML(); ChkErr(window.external.SetObjectFiles("-1")); ChkErr(window.external.SetObjectHTML("-1",html)); ChkErr(window.external.SetObjectFiles("-1",logo_file,swf_file)); } function passText(str) { if(str == "size") { window.document.editor.width.value=swfwidth; window.document.editor.height.value=swfheight; alert('Width and Height are fixed to the original SWF movie size.'); } if(str == "aspect") alert('If Width or Height are changed the other dimension will be changed to match the orginal SWF movie aspect ratio.'); if(str == "any") alert('Any size Width or Height can be entered.') WriteSelectedObject( window.document.editor ); } function SWFpass(vars, val) { window.document.swfmovie.SetVariable(vars,val); WriteSelectedObject( window.document.editor ); } function PassUrl(url, target) { window.document.swfmovie.SetVariable('tarvar',target); window.document.swfmovie.SetVariable('mywebsite',url); WriteSelectedObject( window.document.editor ); } function PassType(form, val) { form.target.value = val; WriteSelectedObject( window.document.editor ); } function SWFmovie(swfmov, val) { window.document.swfmovie.LoadMovie(0,swfmov); SWFpass('textfx',window.document.editor.text.value); PassUrl(window.document.editor.url.value,window.document.editor.target.value); swfcolor = val; swf_file = swfmov; WriteSelectedObject( window.document.editor ); } function widthchg(str) { if(str == "size") { window.document.editor.width.value=swfwidth; window.document.editor.height.value=swfheight; } if(str == "aspect") window.document.editor.height.value=Math.round((window.document.editor.width.value)*(swfheight/swfwidth)); WriteSelectedObject( window.document.editor ); } function heightchg(str) { if(str == "size") { window.document.editor.width.value=swfwidth; window.document.editor.height.value=swfheight; } if(str == "aspect") window.document.editor.width.value=Math.round((window.document.editor.height.value)*(swfwidth/swfheight)); WriteSelectedObject( window.document.editor ); } // End --> </SCRIPT> </HEAD> <STYLE TYPE="text/css">TD {font:normal 10pt Arial, sans-serif; color:#ffff00}</STYLE> <BODY SCROLL="auto" bgcolor="666699" text="000000" VLINK="#f0f0f0" ALINK="#ffcc00" LINK="#f0f0f0"> <center> <SCRIPT LANGUAGE="JavaScript"> <!-- Begin ChkErr( window.external.CopyFile( objects_folder + "Clip Art\\" + logo_file, temp_folder ) ); // End --> </SCRIPT> <center> <IMG SRC="Flare SWFlet Logo.gif" WIDTH=230 HEIGHT=43><br> <font face="arial, helvetica" size=2 color="D9D9D9"> <b>Visit <a href="http://www.imediabuilders.com" target="imediawin">iMEDIA Builders</a> for help with this and other SWFlets.</b></font><br><br> <FORM NAME="editor" ACTION=""> <table border=1 bgcolor="ddddd0"> <tr> <td> <table width=420 border=0 cellspacing=0 cellpadding=4> <TR> <TD><font color="000000"><b>Enter Text:</b></font></TD> <td><input type=text name="text" size=24 maxlength=17 onBlur="javascript:SWFpass('textfx',text.value)"></td> </tr> <tr> <td><font color="000000"><b>Background Color:</b></font></td><td><TABLE BORDER=0 bgcolor="FFFFFF"><TR> <TD BGCOLOR="#000000"><input CHECKED type="radio" name="bgcolor" onClick="SWFmovie(swf_file1,'1')" value="1"> </A></TD> <TD BGCOLOR="#FFFFFF"><input type="radio" name="bgcolor" onClick="SWFmovie(swf_file2,'2')" value="2"> </A></TD> <TD BGCOLOR="#FFFF00"><input type="radio" name="bgcolor" onClick="SWFmovie(swf_file3,'3')" value="3"> </A></TD> </TR> </table> </td> </tr> <TR> <TD><font color="000000"><b>URL Link:</b></font></TD> <TD><input type="text" size="39" name="url" value="http://" onBlur="javascript:PassUrl(url.value,target.value)"></td> </TR> <TR> <TD><font color="000000"><b>Target Type:</b></font></TD> <TD><SELECT name="type" onChange="javascript:PassType(this.form,this.value)"> <OPTION SELECTED VALUE="_blank"> New Window</OPTION> <OPTION VALUE="_self">Current Frame of Window</OPTION> <OPTION VALUE="_top"> Entire Frame of the Current Window</OPTION> <OPTION VALUE=""> User Defined </OPTION></SELECT></td> </TR> <TR> <TD><font color="000000"><b>Target Value:</b></font></TD> <TD><input type="text" size="39" name="target" value="_blank" onChange="javascript:WriteSelectedObject(this.form);"></TD> </TR> <tr> <td><font color="000000"><b>Dimensions:</b></font></td> <td><select name="size" onchange="javascript:passText(this.options[this.selectedIndex].value)"> <option value="size" selected>Original Size <option value="aspect">Original Aspect <option value="any">Any Size</select> <font color="000000"><b>W</b></font> <input type="text" size=4 maxlength=4 name=width value=" " onChange="javascript:widthchg(this.form.size.value);"> <font color="000000"><b>H</b></font> <input type="text" size=4 maxlength=4 name=height value=" " onChange="javascript:heightchg(this.form.size.value);"> </td> </tr> <tr> <td colspan=2 align=center> <font size=1 face="arial" color="000000"><b>Preview below does not match edited dimensions</b></font> </td> </tr> </table> </FORM> <SCRIPT LANGUAGE="JavaScript"> <!-- Begin current = ReadSelectedObject( document.editor ); document.write( SWF_HTML( 0 ) ); if(window.external.GetObjectHTML("-1")==defined) WriteSelectedObject( document.editor ); if(window.document.editor.bgcolor[0].checked == true) SWFmovie(swf_file1,'1'); if(window.document.editor.bgcolor[1].checked == true) SWFmovie(swf_file2,'2'); if(window.document.editor.bgcolor[2].checked == true) SWFmovie(swf_file3,'3'); // End --> </SCRIPT> </table> </center> <!--Start Promotional Stuff --> <br><table width=420 cellspadding=0 cellspacing=0 > <tr><td><font face="arial, helvetica" size=2 color="D9D9D9"><b> These SWFlets were created by iMEDIA Builders and are provided as free plugins for Cool Page by iMEDIA Builders. iMEDIA Builders.com and CoolPage.com are owned by separate companies. <p>The above SWFlet (pronounced "swif-let") is offered free for unlimited use. Just remember to visit <a href="http://www.imediabuilders.com" target="imediawin"> iMEDIA Builders</a> to view and download more Flare SWFlets and Flash animation products. All Flash (SWF) movies published with a FlareSWFlet, FlareExpress, or FlareWorks are compatible with CoolPage's drag-n-drop, resizing, positioning, publishing, and unlimited undo features. <p> iMEDIA Builders has <a href="http://www.swflets.com" target="imediawin">Flare SWFlets</a> to easily create Text Effects, Ad Banners, and Animation Clips including the ability to customize scale, opacity, rotate, motion paths, and other effects. You can pick the font type, size, color, load any GIF or JPG image and set the URL link.</font> </td></tr></table></center> <!--End Promotional Stuff --> </BODY> </HTML>